<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
    <!--    解决闪烁问题 一般是网络卡顿引起-->
    <style>
        [v-clock] {
            display: none;
        }
    </style>
</head>
<body>
<div id="app" v-clock>
    <h1>{{infos.name}}</h1>
    <!--        需要将a标签的href与vm绑定-->
    <a v-bind:href=infos.url target="_blank">click</a>
</div>
<script>
    var vm = new Vue({
        el: "#app",
        data() {
            return {
                infos: {
                    name: null,
                    age: null,
                    url: null,
                    info: {
                        country: null,
                        pro: null
                    }
                }

            }
        },
        mounted() {
            //钩子函数 联试编程  ES6新特性
            axios.get('data.json').then(response => (this.infos = response.data));
        }
    })
</script>

</body>
</html>